package customgms

import (
	"time"
)

// 礼包
type GmsAppCgpGift struct {
	ID         uint      // 主键ID                             // 礼包id[主键]
	ExpireTime time.Time `json:"expireTime" form:"expireTime" gorm:"column:expire_time;comment:过期时间;"`
	Name       string    `json:"name" form:"name" gorm:"column:name;comment:礼包名;size:255;"`
	Remark     string    `json:"remark" form:"remark" gorm:"column:remark;comment:备注;size:255;"`
	StartTime  time.Time `json:"startTime" form:"startTime" gorm:"column:start_time;comment:开始时间;"`
	StrItems   string    `json:"strItems" form:"strItems" gorm:"column:str_items;comment:奖励内容;size:500;"`
	Valid      int       `json:"valid" form:"valid" gorm:"column:valid;comment:兑换开关;size:19;"`
}

// 礼包码
type GmsAppCgp struct {
	ID         uint      // 主键ID                             // id[主键]
	Cgp        string    `json:"cgp" form:"cgp" gorm:"column:cgp;comment:;size:50;"`
	PackageId  int       `json:"packageId" form:"packageId" gorm:"column:package_id;comment:;"`
	StrServIds string    `json:"strServIds" form:"strServIds" gorm:"column:str_serv_ids;comment:;size:500;"`
	Code       string    `json:"code" form:"code" gorm:"column:code;comment:;"`
	Valid      int       `json:"valid" form:"valid" gorm:"column:valid;comment:兑换开关;size:19;"`
	UsedCount  int       `json:"usedCount" form:"usedCount" gorm:"column:used_count;comment:使用数量;size:19;"`
	MaxCount   int       `json:"maxCount" form:"maxCount" gorm:"column:max_count;comment:数量限制;size:19;"`
	ExpireTime time.Time `json:"expireTime" form:"expireTime" gorm:"column:expire_time;comment:过期时间;"`
	StartTime  time.Time `json:"startTime" form:"startTime" gorm:"column:start_time;comment:开始时间;"`
}

// 礼包使用信息
type GmsAppCgpUse struct {
	ID      string    // 主键ID  rid+cgp
	Cgp     string    `json:"cgp" form:"cgp" gorm:"column:cgp;comment:;size:50;"`
	Num     int       `json:"num" form:"num" gorm:"column:num;comment:使用数量;size:19;"`
	Rid     int       `json:"rid" form:"rid" gorm:"column:rid;comment:使用数量;size:19;"`
	UseTime time.Time `json:"useTime" form:"useTime" gorm:"column:usetime;comment:开始时间;"`
}

//公告表 gms_send_notice
type GmsSendNotice struct {
	ID           uint      // 主键ID
	StartTime    time.Time `json:"startTime" form:"startTime" gorm:"column:start_time;comment:开始时间;"`
	EndTime      time.Time `json:"endTime" form:"endTime" gorm:"column:end_time;comment:结束时间;"`
	StrServIds   string    `json:"strServIds" form:"strServIds" gorm:"column:str_serv_ids;comment:;size:500;"`
	Status       int       `json:"status" form:"status" gorm:"column:status;comment:状态;size:10;"`
	Announcement string    `json:"announcement" form:"announcement" gorm:"column:announcement;comment:;type:longtext;size:0;"`
}

//邮件 gms_send_mail
type GmsSendMail struct {
	ID               uint      // 主键ID
	SendTime         time.Time `json:"sendTime" form:"sendTime" gorm:"column:send_time;comment:发送时间;"`
	RegisteredBefore int64     `json:"registeredBefore" form:"registeredBefore" gorm:"column:registered_before;comment:;size:0;"`
	RegisteredAfter  int64     `json:"registeredAfter" form:"registeredAfter" gorm:"column:registered_after;comment:;size:0;"`
	Attach           string    `json:"attach" form:"attach" gorm:"column:attach;comment:附件;size:500;"`
	RoleIds          string    `json:"roleIds" form:"roleIds" gorm:"column:role_ids;comment:;size:0;"`
	StrServIds       string    `json:"strServIds" form:"strServIds" gorm:"column:str_serv_ids;comment:;size:500;"`
	Status           int       `json:"status" form:"status" gorm:"column:status;comment:状态;size:10;"`
	MailContent      string    `json:"mailContent" form:"mailContent" gorm:"column:mail_content;comment:;type:longtext;size:0;"`
}
